<!DOCTYPE html>
<html>

<head>
  <meta http-equiv="X-UA-Compatible" content="chrome=1" />
  <link rel="icon" href="images/favicon.svg" sizes="any" type="image/svg+xml" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
  <meta name="apple-mobile-web-app-capable" content="yes" />
  <title>SVG 在线编辑器</title>
  <meta name="keywords" content="SVG, SVG 在线编辑器" />
  <meta name="description"
    content="SVG 在线编辑器是一款非常方便的 SVG  在线编辑器，通过浏览器访问即可实现打开本地 SVG 文件在线编辑，也可以导入图片，对于制作好的 SVG 我们可以保存到本地来使用。" />

  <meta charset="utf-8" />

  <!-- build:css all.css -->
  <link rel="stylesheet" href="css/base.css" type="text/css" />
  <link rel="stylesheet" href="css/method-draw.css" type="text/css" />
  <link rel="stylesheet" href="css/jpicker.css" type="text/css" />
  <link rel="stylesheet" href="css/jgraduate.css" type="text/css" />
  <link rel="stylesheet" href="css/fonts.css" type="text/css" />
  <link rel="stylesheet" href="css/dropdown.css" type="text/css" />
  <link rel="stylesheet" href="css/draginput.css" type="text/css" />
  <link rel="stylesheet" href="css/menu.css" type="text/css" />
  <link rel="stylesheet" href="css/rulers.css" type="text/css" />
  <link rel="stylesheet" href="css/palette.css" type="text/css" />
  <link rel="stylesheet" href="css/color-tool.css" type="text/css" />
  <link rel="stylesheet" href="css/context-menu.css" type="text/css" />
  <link rel="stylesheet" href="css/shapelib.css" type="text/css" />
  <link rel="stylesheet" href="css/modal.css" type="text/css" />
  <link rel="stylesheet" href="css/source.css" type="text/css" />
  <link rel="stylesheet" href="css/keyboard.css" type="text/css" />
  <link rel="stylesheet" href="css/dialog.css" type="text/css" />
  <link rel="stylesheet" href="css/app.css" type="text/css" />
  <link rel="stylesheet" href="css/tools.css" type="text/css" />
  <link rel="stylesheet" href="css/button.css" type="text/css" />
  <link rel="stylesheet" href="css/select.css" type="text/css" />
  <link rel="stylesheet" href="css/panel.css" type="text/css" />
  <link rel="stylesheet" href="css/align_buttons.css" type="text/css" />
  <link rel="stylesheet" href="css/text.css" type="text/css" />
  <link rel="stylesheet" href="css/sponsors.css" type="text/css" />
  <link rel="stylesheet" href="css/zoom-dropdown.css" type="text/css" />
  <link rel="stylesheet" href="css/loading.css" type="text/css" />
  <!-- endbuild -->
</head>

<body class="loading">
  <div id="method-draw" class="app">
    <div id="rulers">
      <div id="ruler_corner"></div>
      <div id="ruler_x"></div>
      <div id="ruler_y"></div>
    </div>

    <div id="workarea">
      <div id="svgcanvas"></div>
    </div>

    <div id="menu_bar">
     
      <div class="menu">
        <div class="menu_title">文件</div>
        <div class="menu_list inverted-undo" id="file_menu">
          <div data-action="clear" id="tool_clear" class="menu_item">
            新建文档
          </div>

          <div id="tool_open" class="menu_item">
            <input type="file" accept="image/svg+xml" id="tool_open_input" />
            打开 SVG... <span class="shortcut" style="display: none">⌘O</span>
          </div>

          <div id="tool_import" class="menu_item">
            <input type="file" accept="image/*" id="tool_import_input" />
            导入图片... <span class="shortcut" style="display: none">⌘K</span>
          </div>
          <div data-action="save" id="tool_save" class="menu_item">
            保存 SVG... <span class="shortcut">⌘S</span>
          </div>
          <div data-action="export" id="tool_export" class="menu_item">
            导出 PNG
          </div>
        </div>
      </div>

      <div class="menu">
        <div class="menu_title">编辑</div>
        <div class="menu_list inverted-undo" id="edit_menu">
          <div data-action="undo" class="menu_item" id="tool_undo">
            撤销 <span class="shortcut">⌘Z</span>
          </div>
          <div data-action="redo" class="menu_item" id="tool_redo">
            重做 <span class="shortcut">⌘Y</span>
          </div>
          <div class="separator"></div>
          <div data-action="cutSelected" class="menu_item action_selected disabled" id="tool_cut">
            剪切 <span class="shortcut">⌘X</span>
          </div>
          <div data-action="copySelected" class="menu_item action_selected disabled" id="tool_copy">
            复制 <span class="shortcut">⌘C</span>
          </div>
          <div data-action="pasteSelected" class="menu_item action_selected disabled" id="tool_paste">
            粘贴 <span class="shortcut">⌘V</span>
          </div>
          <div data-action="duplicateSelected" class="menu_item action_selected disabled" id="tool_clone">
            复制并粘贴 <span class="shortcut">⌘D</span>
          </div>
          <div data-action="deleteSelected" class="menu_item action_selected disabled" id="tool_delete">
            删除 <span>⌫</span>
          </div>
        </div>
      </div>

      <div class="menu">
        <div class="menu_title">对象</div>
        <div class="menu_list inverted-undo" id="object_menu">
          <div class="menu_item action_selected disabled" id="tool_move_top">
            置于顶层 <span class="shortcut">⌘⇧↑</span>
          </div>
          <div class="menu_item action_selected disabled" id="tool_move_up">
            置于上一层 <span class="shortcut">⌘↑</span>
          </div>
          <div class="menu_item action_selected disabled" id="tool_move_down">
            置于下一层 <span class="shortcut">⌘↓</span>
          </div>
          <div class="menu_item action_selected disabled" id="tool_move_bottom">
            置于底层 <span class="shortcut">⌘⇧↓</span>
          </div>
          <div class="separator"></div>
          <div class="menu_item action_multi_selected disabled" id="tool_group">
            合并所选对象 <span class="shortcut">⌘G</span>
          </div>
          <div class="menu_item action_group_selected disabled" id="tool_ungroup">
            解除合并 <span class="shortcut">⌘⇧G</span>
          </div>
          <div class="separator"></div>
          <div class="menu_item action_path_convert_selected disabled" id="tool_topath">
            转为 Path
          </div>
          <div class="menu_item action_path_selected disabled" id="tool_reorient">
            重新调整 path
          </div>
        </div>
      </div>

      <div class="menu">
        <div class="menu_title">视图</div>
        <div class="menu_list inverted-undo" id="view_menu">
          <div class="menu_item push_button_pressed" id="tool_rulers">
            显示刻度尺 <span class="shortcut">⇧R</span>
          </div>
          <div class="menu_item" id="tool_wireframe">显示 Wireframe</div>
          <div class="separator"></div>
          <div class="menu_item" id="tool_source" data-action="source">
            源代码... <span class="shortcut">⌘U</span>
          </div>
        </div>
      </div>

      <button onclick="iframeSendMsg()">信息传出</button>
    </div>

    <div id="panels" class="tools_panel">
      <div id="canvas_panel" class="context_panel">
        <h4>属性配置</h4>

        <div class="draginputs">
          <label class="draginput twocol textcontent" data-title="Change Content">
            <input id="canvas_title" type="text" />
            <span>文件名称</span>
          </label>

          <label data-title="Change canvas width" class="draginput">
            <input id="canvas_width" type="text" pattern="[0-9]*" value="800" />
            <span class="icon_label">宽度</span>
          </label>

          <label data-title="Change canvas height" class="draginput">
            <input id="canvas_height" type="text" pattern="[0-9]*" value="600" />
            <span class="icon_label">高度</span>
          </label>

          <label data-title="Change canvas color" class="draginput">
            <span>颜色</span>
            <div id="color_canvas_tools">
              <div class="color_tool active" id="tool_canvas">
                <div class="color_block">
                  <div id="canvas_bg"></div>
                  <div id="canvas_color"></div>
                </div>
              </div>
            </div>
          </label>

          <div class="draginput">
            <span>视口大小</span>
            <select id="resolution">
              <option id="selectedPredefined" selected="selected">
                Custom
              </option>
              <option id="fitToContent" value="content">
                Fit to Content
              </option>

              <optgroup label="Social Media">
                <option value="1012x506">Twitter Post (1012 × 506)</option>
                <option value="1500x500">Twitter Header (1500 × 500)</option>
                <option value="1200x630">Facebook Post (1200 × 630)</option>
                <option value="820x312">Facebook Cover (820 × 312)</option>
                <option value="1080x1080">
                  Instagram Post (1080 × 1080)
                </option>
                <option value="1080x1920">
                  Instagram Story (1080 × 1920)
                </option>
                <option value="300">Dribble Shot (400 × 300)</option>
                <option value="800x600">Dribble Shot HD (800 × 600)</option>
                <option value="1584x396">LinkedIn Cover (1584 × 396)</option>
              </optgroup>

              <optgroup label="Presentation">
                <option value="1920x1080">16:9 (1920 × 1080)</option>
                <option value="1024x768">4:3 (1024 × 768)</option>
              </optgroup>

              <optgroup label="Desktop">
                <option value="1140x1024">Desktop (1140 × 1024)</option>
                <option value="375x700">MacBook (834 × 1194)</option>
                <option value="1440x900">MacBook Pro (1024 × 1366)</option>
                <option value="1500x1000">Surface Book (1440 × 990)</option>
                <option value="1280x720">iMac (1368 × 912)</option>
              </optgroup>

              <optgroup label="Tablet">
                <option value="414x896">iPad Mini (768 × 1024)</option>
                <option value="375x812">iPad Pro 11" (834 × 1194)</option>
                <option value="375x812">iPad Pro 12.9" (1024 × 1366)</option>
                <option value="414x736">Surface Pro 3 (1440 × 990)</option>
                <option value="414x736">Surface Pro 4 (1368 × 912)</option>
              </optgroup>

              <optgroup label="Phone">
                <option value="414x896">iPhone 11 ProMax (414 × 896)</option>
                <option value="375x812">iPhone 11 Pro / X (375 × 812)</option>
                <option value="414x736">iPhone 8 Plus (414 × 736)</option>
                <option value="375x667">iPhone 8 (375 × 667)</option>
                <option value="411x731">Google Pixel 2 (411 × 731)</option>
                <option value="411x823">Google Pixel XL (411 × 823)</option>
                <option value="360x640">Android (360 × 640)</option>
              </optgroup>

              <optgroup label="Paper">
                <option value="595x842">A4 (595 × 842)</option>
                <option value="420x595">A5 (420 × 595)</option>
                <option value="297x420">A6 (297 × 420)</option>
                <option value="612x792">Letter (612 × 792)</option>
                <option value="792x1224">Tabloid (792 × 1224)</option>
              </optgroup>
            </select>
            <div class="caret"></div>
            <label id="resolution_label">Custom</label>
          </div>
        </div>
      </div>
      <!-- 基础配置 -->
      <div id="base_panel" class="context_panel">
        <h4>基础配置</h4>
        <div class="draginputs">
          <label class="draginput twocol textcontent">
            <input id="base_VID" type="text" class="attr_changer" data-title="Change ID coordinate" data-attr="VID" />
            <span>设备ID</span>
          </label>
          <label class="draginput twocol textcontent">
            <input id="base_VName" type="text" class="attr_changer" data-title="Change ID coordinate" data-attr="VName" />
            <span>设备名称</span>
          </label>
        </div>
      </div>
      <!-- 右侧属性 -->
      <div id="rect_panel" class="context_panel">
        <h4>矩形属性</h4>
        <div class="draginputs">
          
          <label class="draginput">
            <input id="rect_x" class="attr_changer" data-title="Change X coordinate" data-attr="x" pattern="[0-9]*" />
            <span>距左</span>
          </label>
          <label class="draginput">
            <input id="rect_y" class="attr_changer" data-title="Change Y coordinate" data-attr="y" pattern="[0-9]*" />
            <span>距上</span>
          </label>
          <label class="draginput" id="rect_width_tool attr_changer" data-title="Change rectangle width">
            <input id="rect_width" class="attr_changer" data-attr="width" type="text" pattern="[0-9]*" />
            <span class="icon_label">宽度</span>
          </label>
          <label class="draginput" id="rect_height_tool" data-title="Change rectangle height">
            <input id="rect_height" class="attr_changer" data-attr="height" type="text" pattern="[0-9]*" />
            <span class="icon_label">高度</span>
          </label>
        </div>
      </div>

      <div id="path_panel" class="context_panel clearfix">
        <h4>Path属性</h4>
        <div class="draginputs">
          <label>
            <input id="path_x" class="attr_changer" data-title="Change ellipse's cx coordinate" data-attr="x"
              pattern="[0-9]*" />
            <span>距左</span>
          </label>
          <label>
            <input id="path_y" class="attr_changer" data-title="Change ellipse's cy coordinate" data-attr="y"
              pattern="[0-9]*" />
            <span>距上</span>
          </label>
        </div>
      </div>

      <div id="image_panel" class="context_panel clearfix">
        <h4>Image属性</h4>
        <div class="draginputs">
          <label class="draginput">
            <input id="image_x" class="attr_changer" data-title="Change X coordinate" data-attr="x" pattern="[0-9]*" />
            <span>距左</span>
          </label>
          <label class="draginput">
            <input id="image_y" class="attr_changer" data-title="Change Y coordinate" data-attr="y" pattern="[0-9]*" />
            <span>距上</span>
          </label>
          <label class="draginput">
            <input id="image_width" class="attr_changer" data-title="Change image width" data-attr="width"
              pattern="[0-9]*" />
            <span class="icon_label">宽度</span>
          </label>
          <label class="draginput">
            <input id="image_height" class="attr_changer" data-title="Change image height" data-attr="height"
              pattern="[0-9]*" />
            <span class="icon_label">高度</span>
          </label>
        </div>
      </div>

      <div id="circle_panel" class="context_panel">
        <h4>Circle属性</h4>
        <div class="draginputs">
          <label id="tool_circle_cx" class="draginput">
            <span>Center X</span>
            <input id="circle_cx" class="attr_changer" title="Change circle's cx coordinate" data-attr="cx" />
          </label>
          <label id="tool_circle_cy" class="draginput">
            <span>Center Y</span>
            <input id="circle_cy" class="attr_changer" title="Change circle's cy coordinate" data-attr="cy" />
          </label>
          <label id="tool_circle_r" class="draginput">
            <span>Radius</span>
            <input id="circle_r" class="attr_changer" title="Change circle's radius" data-attr="r" />
          </label>
        </div>
      </div>

      <div id="ellipse_panel" class="context_panel">
        <h4>Ellipse属性</h4>
        <div class="draginputs">
          <label id="tool_ellipse_cx">
            <input id="ellipse_cx" class="attr_changer" data-title="Change ellipse's cx coordinate" data-attr="cx"
              pattern="[0-9]*" />
            <span>距左</span>
          </label>
          <label id="tool_ellipse_cy">
            <input id="ellipse_cy" class="attr_changer" data-title="Change ellipse's cy coordinate" data-attr="cy"
              pattern="[0-9]*" />
            <span>距上</span>
          </label>
          <label id="tool_ellipse_rx">
            <input id="ellipse_rx" class="attr_changer" data-title="Change ellipse's x radius" data-attr="rx"
              pattern="[0-9]*" />
            <span>X轴半径</span>
          </label>
          <label id="tool_ellipse_ry">
            <input id="ellipse_ry" class="attr_changer" data-title="Change ellipse's y radius" data-attr="ry"
              pattern="[0-9]*" />
            <span>Y轴半径</span>
          </label>
        </div>
      </div>

      <div id="line_panel" class="context_panel clearfix">
        <h4>Line属性</h4>
        <div class="draginputs">
          <label id="tool_line_x1">
            <input id="line_x1" class="attr_changer" data-title="Change line's starting x coordinate" data-attr="x1"
              pattern="[0-9]*" />
            <span>起点距左</span>
          </label>
          <label id="tool_line_y1">
            <input id="line_y1" class="attr_changer" data-title="Change line's starting y coordinate" data-attr="y1"
              pattern="[0-9]*" />
            <span>起点距上</span>
          </label>
          <label id="tool_line_x2">
            <input id="line_x2" class="attr_changer" data-title="Change line's ending x coordinate" data-attr="x2"
              pattern="[0-9]*" />
            <span>终点距左</span>
          </label>
          <label id="tool_line_y2">
            <input id="line_y2" class="attr_changer" data-title="Change line's ending y coordinate" data-attr="y2"
              pattern="[0-9]*" />
            <span>终点距上</span>
          </label>
        </div>
      </div>

      <div id="text_panel" class="context_panel">
        <h4>Text属性</h4>
        <div class="draginputs">
          <label class="draginput twocol textcontent hidden" data-title="Change Content">
            <input id="text" type="text" autocomplete="off" />
            <span>Content</span>
          </label>
          <label>
            <input id="text_x" class="attr_changer" data-title="Change text x coordinate" data-attr="x"
              pattern="[0-9]*" />
            <span>距左</span>
          </label>
          <label>
            <input id="text_y" class="attr_changer" data-title="Change text y coordinate" data-attr="y"
              pattern="[0-9]*" />
            <span>距上</span>
          </label>
          <div class="toolset draginput twocol" id="tool_font_family">
            <!-- Font family -->
            <span>字体类型</span>
            <div id="preview_font" style="font-family: sans-serif">
              sans-serif
            </div>
            <div class="caret"></div>
            <input id="font_family" data-title="Change Font Family" size="12" type="hidden" />
            <select id="font_family_dropdown"></select>
          </div>
          <div class="draginput font_style">
            <span>字体样式</span>
            <div id="tool_bold" data-title="Bold Text [B]">B</div>
            <div id="tool_italic" data-title="Italic Text [I]">i</div>
          </div>
          <label id="tool_font_size" data-title="Change Font Size">
            <input id="font_size" value="0" />
            <span id="font_sizeLabel" class="icon_label">字体大小</span>
          </label>
        </div>
      </div>

      <!-- formerly gsvg_panel -->
      <div id="svg_panel" class="context_panel clearfix">
        <h4>SVG属性</h4>
      </div>

      <div id="use_panel" class="context_panel clearfix">
        <h4>Use属性</h4>
        <div class="button full" id="tool_unlink_use" data-title="Break link">
          Break use ref
        </div>
      </div>

      <div id="g_panel" class="context_panel clearfix">
        <h4>Group属性</h4>
        <div class="draginputs">
          <label>
            <input id="g_x" class="attr_changer" data-title="Change groups's x coordinate" data-attr="x"
              pattern="[0-9]*" />
            <span>距左</span>
          </label>
          <label>
            <input id="g_y" class="attr_changer" data-title="Change groups's y coordinate" data-attr="y"
              pattern="[0-9]*" />
            <span>距上</span>
          </label>
        </div>
        <div class="button full" title="Ungroup Elements" id="button_ungroup">
          解除组
        </div>
      </div>

      <div id="path_node_panel" class="context_panel clearfix">
        <h4>Edit Path</h4>

        <div class="draginputs">
          <label id="tool_node_x">
            <input id="path_node_x" class="attr_changer" data-title="Change node's x coordinate" data-attr="x" />
            <span>距左</span>
          </label>
          <label id="tool_node_y">
            <input id="path_node_y" class="attr_changer" data-title="Change node's y coordinate" data-attr="y" />
            <span>距上</span>
          </label>

          <div id="segment_type" class="draginput label">
            <span>集合类型</span>
            <select id="seg_type" data-title="Change Segment type">
              <option id="straight_segments" selected="selected" value="4">
                Straight
              </option>
              <option id="curve_segments" value="6">Curve</option>
            </select>
            <div class="caret"></div>
            <label id="seg_type_label">Straight</label>
          </div>
        </div>

        <div class="button-container clearfix">
          <div class="button full" id="tool_node_clone" title="Adds a node">
            添加节点
          </div>
          <div class="button full" id="tool_node_delete" title="Delete Node">
            删除节点
          </div>
          <div class="button full" id="tool_openclose_path" title="Open/close sub-path">
            打开/关闭 Path
          </div>
        </div>
      </div>

      <!-- Buttons when a single element is selected -->
      <div id="selected_panel" class="context_panel">
        <div class="draginputs">
          <label id="tool_angle" data-title="Change rotation angle" class="draginput">
            <input id="angle" class="attr_changer" size="2" value="0" data-attr="transform" data-min="-180"
              data-max="180" type="text" />
            <span class="icon_label">旋转</span>
            <div id="tool_angle_indicator" class="angle">
              <div id="tool_angle_indicator_cursor" class="angle-cursor"></div>
            </div>
          </label>

          <label id="tool_opacity" data-title="Change selected item opacity">
            <input id="group_opacity" class="attr_changer" data-attr="opacity" value="100" step="5" min="0" max="100" />
            <span id="group_opacityLabel" class="icon_label">透明</span>
          </label>

          <label id="tool_blur" data-title="Change gaussian blur value">
            <input id="blur" size="2" value="0" step=".1" min="0" max="10" />
            <span class="icon_label">模糊</span>
          </label>

          <label id="cornerRadiusLabel" data-title="Change Rectangle Corner Radius">
            <input id="rect_rx" value="0" data-attr="rx" class="attr_changer" type="text" pattern="[0-9]*" />
            <span class="icon_label">圆角</span>
          </label>
        </div>

        <div id="align_tools">
          <h4>画布对齐</h4>
          <div class="toolset align_buttons" id="tool_position">
            <label>
              <div class="col last clear" id="position_opts">
                <div class="align_button" id="tool_posleft" title="Align Left" data-align="left">
                  <svg viewBox="0 0 27 27" xmlns="http://www.w3.org/2000/svg" width="27" height="27">
                    <path
                      d="M 2 1 L 2 5 L 14 5 L 14 11 L 2 11 L 2 16 L 20 16 L 20 22 L 2 22 L 2 26 L 1 26 L 1 1 L 2 1 Z" />
                  </svg>
                </div>
                <div class="align_button" id="tool_poscenter" title="Align Center" data-align="center">
                  <svg viewBox="0 0 27 27" xmlns="http://www.w3.org/2000/svg" width="27" height="27">
                    <path
                      d="M 13 1 L 14 1 L 14 6 L 22 6 L 22 12 L 14 12 L 14 15 L 19 15 L 19 21 L 14 21 L 14 26 L 13 26 L 13 21 L 8 21 L 8 15 L 13 15 L 13 12 L 5 12 L 5 6 L 13 6 L 13 1 Z" />
                  </svg>
                </div>
                <div class="align_button" id="tool_posright" title="Align Right" data-align="right">
                  <svg viewBox="0 0 27 27" xmlns="http://www.w3.org/2000/svg" width="27" height="27">
                    <path
                      d="M 25 1 L 25 5 L 13 5 L 13 11 L 25 11 L 25 16 L 7 16 L 7 22 L 25 22 L 25 26 L 26 26 L 26 1 L 25 1 Z" />
                  </svg>
                </div>
                <div class="align_button" id="tool_postop" title="Align Top" data-align="top">
                  <svg viewBox="0 0 27 27" xmlns="http://www.w3.org/2000/svg" width="27" height="27">
                    <path
                      d="M 1 2 L 5 2 L 5 14 L 11 14 L 11 2 L 16 2 L 16 20 L 22 20 L 22 2 L 26 2 L 26 1 L 1 1 L 1 2 Z" />
                  </svg>
                </div>
                <div class="align_button" id="tool_posmiddle" title="Align Middle" data-align="middle">
                  <svg viewBox="0 0 27 27" xmlns="http://www.w3.org/2000/svg" width="27" height="27">
                    <path
                      d="M 26 13 L 26 14 L 21 14 L 21 22 L 15 22 L 15 14 L 12 14 L 12 19 L 6 19 L 6 14 L 1 14 L 1 13 L 6 13 L 6 8 L 12 8 L 12 13 L 15 13 L 15 5 L 21 5 L 21 13 L 26 13 Z" />
                  </svg>
                </div>
                <div class="align_button" id="tool_posbottom" title="Align Bottom" data-align="bottom">
                  <svg viewBox="0 0 27 27" xmlns="http://www.w3.org/2000/svg" width="27" height="27">
                    <path
                      d="M 1 25 L 5 25 L 5 13 L 11 13 L 11 25 L 16 25 L 16 7 L 22 7 L 22 25 L 26 25 L 26 26 L 1 26 L 1 25" />
                  </svg>
                </div>
              </div>
              <div class="clearfix"></div>
            </label>
          </div>
        </div>
      </div>

      <!-- Buttons when multiple elements are selected -->
      <div id="multiselected_panel" class="context_panel clearfix">
        <h4 class="hidable">多元素属性</h4>

        <div class="toolset align_buttons">
          <label id="tool_align_relative">
            <div class="select-input">
              <select id="align_relative_to" title="Align relative to ..." class="select_tool">
                <option id="selected_objects" value="selected">
                  对象对齐
                </option>
                <option id="page" value="page">页面对齐</option>
              </select>
            </div>
          </label>
          <div class="col last clear">
            <div class="align_button" id="tool_alignleft" title="Align Left" data-align="left">
              <svg viewBox="0 0 27 27" xmlns="http://www.w3.org/2000/svg" width="27" height="27">
                <path d="M 2 1 L 2 5 L 14 5 L 14 11 L 2 11 L 2 16 L 20 16 L 20 22 L 2 22 L 2 26 L 1 26 L 1 1 L 2 1 Z" />
              </svg>
            </div>
            <div class="align_button" id="tool_aligncenter" title="Align Center" data-align="center">
              <svg viewBox="0 0 27 27" xmlns="http://www.w3.org/2000/svg" width="27" height="27">
                <path
                  d="M 13 1 L 14 1 L 14 6 L 22 6 L 22 12 L 14 12 L 14 15 L 19 15 L 19 21 L 14 21 L 14 26 L 13 26 L 13 21 L 8 21 L 8 15 L 13 15 L 13 12 L 5 12 L 5 6 L 13 6 L 13 1 Z" />
              </svg>
            </div>
            <div class="align_button" id="tool_alignright" title="Align Right" data-align="right">
              <svg viewBox="0 0 27 27" xmlns="http://www.w3.org/2000/svg" width="27" height="27">
                <path
                  d="M 25 1 L 25 5 L 13 5 L 13 11 L 25 11 L 25 16 L 7 16 L 7 22 L 25 22 L 25 26 L 26 26 L 26 1 L 25 1 Z" />
              </svg>
            </div>
            <div class="align_button" id="tool_aligntop" title="Align Top" data-align="top">
              <svg viewBox="0 0 27 27" xmlns="http://www.w3.org/2000/svg" width="27" height="27">
                <path d="M 1 2 L 5 2 L 5 14 L 11 14 L 11 2 L 16 2 L 16 20 L 22 20 L 22 2 L 26 2 L 26 1 L 1 1 L 1 2 Z" />
              </svg>
            </div>
            <div class="align_button" id="tool_alignmiddle" title="Align Middle" data-align="middle">
              <svg viewBox="0 0 27 27" xmlns="http://www.w3.org/2000/svg" width="27" height="27">
                <path
                  d="M 26 13 L 26 14 L 21 14 L 21 22 L 15 22 L 15 14 L 12 14 L 12 19 L 6 19 L 6 14 L 1 14 L 1 13 L 6 13 L 6 8 L 12 8 L 12 13 L 15 13 L 15 5 L 21 5 L 21 13 L 26 13 Z" />
              </svg>
            </div>
            <div class="align_button" id="tool_alignbottom" title="Align Bottom" data-align="bottom">
              <svg viewBox="0 0 27 27" xmlns="http://www.w3.org/2000/svg" width="27" height="27">
                <path
                  d="M 1 25 L 5 25 L 5 13 L 11 13 L 11 25 L 16 25 L 16 7 L 22 7 L 22 25 L 26 25 L 26 26 L 1 26 L 1 25" />
              </svg>
            </div>
          </div>
        </div>
        <div class="clearfix"></div>
        <div class="button full" id="button_group">组合元素</div>
        <div class="button full" id="tool_text_on_path" title="Place text on path">
          Place text on path
        </div>
      </div>

      <div id="stroke_panel" class="context_panel">
        <h4>Stroke属性</h4>
        <div class="draginputs">
          <label class="draginput" data-title="Change stroke">
            <input id="stroke_width" size="2" value="1" data-attr="stroke-width" min="0" max="99" step="1" />
            <span class="icon_label">宽度</span>
          </label>
          <div class="stroke_tool draginput">
            <span>划线</span>
            <select id="stroke_style" data-title="Change stroke dash style">
              <option selected="selected" value="none">—</option>
              <option value="2,2">···</option>
              <option value="5,5">- -</option>
              <option value="5,2,2,2">-·-</option>
              <option value="5,2,2,2,2,2">-··-</option>
            </select>
            <div class="caret"></div>
            <label id="stroke_style_label">—</label>
          </div>

          <label style="display: none">
            <span class="icon_label">Stroke Join</span>
          </label>

          <label style="display: none">
            <span class="icon_label">Stroke Cap</span>
          </label>
        </div>
      </div>
    </div>
    <!-- tools_top -->
    <div id="cur_context_panel"></div>

    <div id="tools_left" class="tools_panel">
      <div class="tool_button" id="tool_select" data-mode="select" title="Select Tool [V]">
        <svg viewBox="0 0 24 24" width="24" height="24">
          <path d="M17.15 20.76l-2.94 1.5-3.68-6-4.41 3V1.24l12.5 12.01-4.41 1.5 2.94 6z" />
        </svg>
      </div>
      <div class="tool_button" id="tool_fhpath" data-mode="fhpath" title="Pencil Tool [P]">
        <svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"
          style="transform: scale(-1, 1)">
          <path
            d="M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z" />
        </svg>
      </div>
      <div class="tool_button" id="tool_line" data-mode="line" title="Line Tool [L]">
        <svg viewBox="0 0 27 27" xmlns="http://www.w3.org/2000/svg" width="24" height="24">
          <path d="M 3 1 L 26 24 L 24 26 L 1 3 L 3 1 Z"></path>
        </svg>
      </div>
      <div class="tool_button" id="tool_custom" data-mode="custom" title="Square/custom Tool [R]">
       <svg viewBox="0 0 1422 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" width="24" height="24">
        <path d="M146.49088441 676.65985761c-18.97488776 0.84332812-34.57646136-13.91491736-34.99812625-32.88980512V386.97657416c-0.84332812-18.97488776 13.91491736-34.57646136 32.88980513-34.99812626h2.5299852c18.97488776-0.84332812 34.57646136 13.91491736 34.99812624 32.88980513V637.02342584c3.37331332 18.55322369-9.27661184 36.26311844-27.40817148 39.21476771-2.5299852 0.42166406-5.48163445 0.42166406-8.01161883 0.42166406z m138.72751118 125.23425787c-18.97488776-0.42166406-34.57646136-16.0232385-34.99812625-34.99812625v-510.21364252c0.42166406-18.97488776 16.0232385-34.57646136 34.99812625-34.99812625 19.39655182 0 34.99812625 15.60157444 34.99812624 34.99812625v510.21364252c0 19.39655182-15.60157444 34.99812625-34.99812624 34.99812625z m139.14917523 131.55922046c-18.97488776 0.84332812-34.57646136-13.91491736-34.99812543-32.88980511V125.54479032C388.52611644 106.56990256 403.28436275 90.96832812 422.25924968 90.54666406h2.52998521C444.1857867 88.43834292 461.47401738 102.77492518 463.16067446 122.17147699v776.28373269c0 19.39655182-15.60157444 35.41979032-34.99812625 35.41979032-1.26499219-0.42166406-2.5299852-0.42166406-3.79497739-0.42166406z m823.93178412-387.08770662h-281.24999973c-19.39655182 0-34.99812625-15.60157444-34.99812625-34.99812541 0.42166406-18.97488776 16.0232385-34.57646136 34.99812625-34.99812626h281.24999973c19.39655182 0 34.99812625 15.60157444 34.99812624 34.99812626 0.84332812 18.97488776-13.91491736 34.57646136-32.8898051 34.99812542h-2.10832114z" fill="#FF0100" p-id="2872"></path>
        <path d="M967.04935521 669.4915669c-19.39655182 0-34.99812625-15.60157444-34.99812625-34.99812626V389.08489529c0-19.39655182 15.60157444-34.99812625 34.99812625-34.99812625 18.97488776-0.84332812 34.57646136 13.91491736 34.99812543 32.88980513v247.51686647c0.84332812 18.97488776-13.91491736 34.57646136-32.88980512 34.99812626h-2.10832031z" fill="#FF0100" p-id="2873"></path>
        <path d="M690.85932506 546.36562933H424.36757082c-18.97488776 0.84332812-34.57646136-13.91491736-34.99812543-32.88980511v-2.52998438c0-19.39655182 15.60157444-34.99812625 34.99812543-34.99812625H684.95602654l262.69677686-161.91904037c17.70989475-6.74662665 37.10644657 2.5299852 43.8530732 19.81821587 0.42166406 0.84332812 0.42166406 1.68665707 0.84332813 2.52998521 5.90329853 18.55322369-4.21664145 38.37143958-22.76986432 44.27473727-0.42166406 0-0.42166406 0-0.84332895 0.42166406l-267.75674643 164.02736151-10.11993997 1.26499218z" fill="#FF0100" p-id="2874"></path>
        </svg>
      </div>
      <div class="tool_button" id="tool_rect" data-mode="rect" title="Ellipse/Rect Tool [C]">
        <svg
            viewBox="0 0 27 27"
            xmlns="http://www.w3.org/2000/svg"
            width="24"
            height="24"
          >
            <path d="M 0 8 L 0 24 L 24 24 L 25 8 L 0 8 Z" />
          </svg>
      </div>
      <div class="tool_button" id="tool_ellipse" data-mode="ellipse" title="Ellipse/Circle Tool [C]">
        <svg viewBox="0 0 27 27" xmlns="http://www.w3.org/2000/svg" width="24" height="24">
          <ellipse cx="13" cy="13" rx="13" ry="9"></ellipse>
        </svg>
      </div>

      <div class="tool_button" id="tool_shapelib" data-mode="shapelib" title="Shape Tool [s]">
        <svg xmlns="http://www.w3.org/2000/svg" height="27" width="27" viewBox="0 0 24 24">
          <polygon points="14.43,10 12,2 9.57,10 2,10 8.18,14.41 5.83,22 12,17.31 18.18,22 15.83,14.41 22,10" />
        </svg>
        <div class="tool_menu"></div>
      </div>

      <div class="tool_button" id="tool_path" data-mode="path" title="Path Tool [P]">
        <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 27 27" width="27" height="27">
          <path
            d="M12.2 1.9c0-.36.86 0 .86 0V14a1.3 1.3 0 10.88 0V1.9s.87-.36.87 0c0 6.81 5.22 11.68 5.22 11.68l-3.25 8.2h-6.55l-3.26-8.2s5.22-4.87 5.22-11.68zM7.83 25.26v-2.61h11.32v2.6H7.84z" />
        </svg>
      </div>
      <div class="tool_button" id="tool_text" data-mode="text" title="Text Tool [T]">
        <svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="2 2 20 20" width="27" height="27">
          <path d="M5 4v3h5.5v12h3V7H19V4z" />
        </svg>
      </div>

      <div class="tool_button" id="tool_zoom" data-mode="zoom" title="Zoom Tool [Z]">
        <svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="2 2 20 20" width="27">
          <path
            d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z" />
        </svg>
      </div>

      <div class="tool_button" id="tool_eyedropper" data-mode="eyedropper" title="Eyedropper Tool [E]">
        <svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="2 2 20 20" width="27"
          style="transform: scale(-1, 1)">
          <path
            d="M20.71 5.63l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-3.12 3.12-1.93-1.91-1.41 1.41 1.42 1.42L3 16.25V21h4.75l8.92-8.92 1.42 1.42 1.41-1.41-1.92-1.92 3.12-3.12c.4-.4.4-1.03.01-1.42zM6.92 19L5 17.08l8.06-8.06 1.92 1.92L6.92 19z" />
        </svg>
      </div>

      <div id="color_tools">
        <div id="tool_switch" title="Switch stroke and fill colors [X]">
          <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 11 11">
            <path d="M3.01 2A6 6 0 019 8h1.83l-2.91 2.91L5 8h2a4 4 0 00-3.99-4v1.93L.1 3.02 3.01.1V2z" />
          </svg>
        </div>
        <div class="color_tool active" id="tool_fill">
          <label class="icon_label" title="Change fill color"></label>
          <div class="color_block">
            <div id="fill_bg"></div>
            <div id="fill_color" class="color_block"></div>
          </div>
        </div>

        <div class="color_tool" id="tool_stroke">
          <label class="icon_label" title="Change stroke color"></label>
          <div class="color_block">
            <div id="stroke_bg"></div>
            <div id="stroke_color" class="color_block" title="Change stroke color"></div>
          </div>
        </div>
      </div>
    </div>
    <!-- tools_left -->

    <div id="tools_bottom" class="tools_panel">
      <!-- Zoom buttons -->
      <select id="zoom_select">
        <option value="6">6%</option>
        <option value="12">12%</option>
        <option value="16">16%</option>
        <option value="25">25%</option>
        <option value="50">50%</option>
        <option value="75">75%</option>
        <option value="100" selected="selected">100%</option>
        <option value="150">150%</option>
        <option value="200">200%</option>
        <option value="300">300%</option>
        <option value="400">400%</option>
        <option value="600">600%</option>
        <option value="800">800%</option>
        <option value="1600">1600%</option>
      </select>
      <div id="zoom_panel" class="toolset" title="Change zoom level">
        <div class="select-input" id="zoom_label">
          <span id="zoomLabel" class="zoom_tool icon_label">
            <svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="2 2 20 20" width="27">
              <path
                d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z" />
            </svg>
          </span>
          <input id="zoom" value="100%" type="text" readonly="readonly" />
        </div>
      </div>

      <div id="palette" title="Click to change fill color, shift-click to change stroke color"></div>
    </div>

    <!-- hidden divs -->
    <div id="color_picker"></div>
  </div>
  <!-- /app -->

  <div id="dialog_box">
    <div id="dialog_box_overlay"></div>
    <div id="dialog_container">
      <div id="dialog_content"></div>
      <div id="dialog_buttons"></div>
    </div>
  </div>

  <ul id="cmenu_canvas" class="contextMenu">
    <li>
      <a href="#cut">剪切 <span class="shortcut">⌘X;</span></a>
    </li>
    <li>
      <a href="#copy">复制<span class="shortcut">⌘C</span></a>
    </li>
    <li>
      <a href="#paste">粘贴<span class="shortcut">⌘V</span></a>
    </li>
    <li class="separator">
      <a href="#delete">删除<span class="shortcut">⌫</span></a>
    </li>
    <li class="separator">
      <a href="#group">合并<span class="shortcut">⌘G</span></a>
    </li>
    <li>
      <a href="#ungroup">解除合并<span class="shortcut">⌘⇧G</span></a>
    </li>
    <li class="separator">
      <a href="#move_front">置于顶层<span class="shortcut">⌘⇧↑</span></a>
    </li>
    <li>
      <a href="#move_up">置于上一层<span class="shortcut">⌘↑</span></a>
    </li>
    <li>
      <a href="#move_down">置于下一层<span class="shortcut">⌘↓</span></a>
    </li>
    <li>
      <a href="#move_back">置于底层<span class="shortcut">⌘⇧↓</span></a>
    </li>
  </ul>

  <div class="tools_flyout inverted-undo" id="tools_shapelib">
    <div id="shape_buttons"></div>
  </div>
  <!-- build:js loading.js -->
  <script type="text/javascript" src="js/loading.js"></script>
  <!-- endbuild -->
  <!-- build:js all.js -->
  <script type="text/javascript" src="js/lib/jquery-3.5.1.min.js"></script>
  <script type="text/javascript" src="js/lib/pathseg.js"></script>
  <!-- 热键 -->
  <script type="text/javascript" src="js/lib/jquery.hotkeys.min.js"></script>
  <!--  -->
  <script type="text/javascript" src="js/lib/jquery.jgraduate.js"></script>
  <!-- 右键菜单 -->
  <script type="text/javascript" src="js/lib/jquery.contextMenu.js"></script> 
  <!-- UI -->
  <script type="text/javascript" src="js/lib/jquery-ui-1.8.17.custom.min.js"></script>
  <!--  -->
  <script type="text/javascript" src="js/jquery.attr.js"></script>
  <!-- 拖拽 -->
  <script type="text/javascript" src="js/lib/jquery-draginput.js"></script>
  <script type="text/javascript" src="js/lib/css.min.js"></script>
  <script type="text/javascript" src="js/utils.js"></script>
  <script type="text/javascript" src="js/dao.js"></script>
  <script type="text/javascript" src="js/state.js"></script>
  <script type="text/javascript" src="js/browser.js"></script>
  <script type="text/javascript" src="js/svgutils.js"></script>
  <script type="text/javascript" src="js/history.js"></script>
  <script type="text/javascript" src="js/select.js"></script>
  <script type="text/javascript" src="js/path.js"></script>
  <script type="text/javascript" src="js/sanitize.js"></script>
  <script type="text/javascript" src="js/units.js"></script>
  <script type="text/javascript" src="js/math.js"></script>
  <script type="text/javascript" src="js/translate.js"></script>
  <script type="text/javascript" src="js/svgtransformlist.js"></script>
  <script type="text/javascript" src="js/draw.js"></script>
  <script type="text/javascript" src="js/svgcanvas.js"></script>
  <script type="text/javascript" src="js/editor.js"></script>
  <script type="text/javascript" src="js/Canvas.js"></script>
  <script type="text/javascript" src="js/Text.js"></script>
  <script type="text/javascript" src="js/Pan.js"></script>
  <script type="text/javascript" src="js/Panel.js"></script>
  <script type="text/javascript" src="js/Rulers.js"></script>
  <script type="text/javascript" src="js/Toolbar.js"></script>
  <script type="text/javascript" src="js/Menu.js"></script>
  <script type="text/javascript" src="js/Keyboard.js"></script>
  <script type="text/javascript" src="js/Import.js"></script>
  <script type="text/javascript" src="js/PaintBox.js"></script>
  <script type="text/javascript" src="js/Palette.js"></script>
  <script type="text/javascript" src="js/Zoom.js"></script>
  <script type="text/javascript" src="js/Modal.js"></script>
  <script type="text/javascript" src="js/Title.js"></script>
  <script type="text/javascript" src="js/darkmode.js"></script>
  <script type="text/javascript" src="js/ContextMenu.js"></script>
  <script type="text/javascript" src="js/Shapelib.js"></script>
  <script type="text/javascript" src="js/fonts.js"></script>
  <script type="text/javascript" src="js/dialog.js"></script>
  <script type="text/javascript" src="js/lib/contextmenu.js"></script>
  <!-- 颜色选择器插件 -->
  <script type="text/javascript" src="js/lib/jpicker.min.js"></script>
  <!-- 鼠标滚轮 -->
  <script type="text/javascript" src="js/lib/mousewheel.js"></script>
  <!-- 吸管工具 -->
  <script type="text/javascript" src="js/eyedropper.js"></script>
  <!-- 定时器 -->
  <script type="text/javascript" src="js/lib/requestanimationframe.js"></script>
  <script type="text/javascript" src="js/lib/taphold.js"></script>
  <!-- 保存文件 -->
  <script type="text/javascript" src="js/lib/filesaver.js"></script>
  <script type="text/javascript" src="js/paste.js"></script>
  <!-- 模板文件 -->
  <script type="text/javascript" src="js/modals.js"></script>
  <!-- 初始化文件 -->
  <script type="text/javascript" src="js/start.js"></script>
  <!-- endbuild -->

  <script type="text/javascript">
    let arraySelect = [];
    // iframe向vue传递信息
    function iframeSendMsg() {
      console.log('获取选中的svg元素：',svgCanvas.getSelectedElems())

      const selectedElements = svgCanvas.getSelectedElems();
      const len = selectedElements.length;
      if(len >= 1){
        svgCanvas.selectorManager.requestSelector(selectedElements[0]).showGrips(false);
      }

      window.parent.postMessage({
        cmd: 'myIframe',
        params: {
          info: 'iframe向Vue传递的消息',
          svg: state.get("canvasContent")
        }
      }, '*');
    };

    // iframe获取Vue传递过来的信息
    window.addEventListener("message", getVueMsg);
    function getVueMsg(event) {
      const res = event.data;
      if (res.cmd == 'myVue') {
        const canvasContent = res.params.svg;
        state.set("canvasContent", canvasContent);
        svgCanvas.setSvgString(canvasContent);
      }
    };
    
    function triggerByVue(msg) {
      console.log(msg,arraySelect)

      // 反选
      let PD_30500000_573348 = document.querySelector('#PD_30500000_573348');
      let PD_30500000_873289366 = document.querySelector('#PD_30500000_873289366');
      console.log('反选',PD_30500000_573348,PD_30500000_873289366);
     
      svgCanvas.selectOnly([PD_30500000_573348,PD_30500000_873289366],true)
    }
  </script>
  </div>
</body>

</html>